package com.macro.mall.tiny.component.wx.entity.bo;

import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderV3Request;
import com.macro.mall.tiny.component.wx.entity.vo.WxCreateOrderVO;
import lombok.Data;

/**
 * @author yelong.xie
 * @date 2024/7/3 19:21
 */
@Data
public class WxBO {
    private String sessionKey;
    private String openid;
    private String unionid;
    private Boolean success = Boolean.TRUE;
    private String errorMsg;
    private String purePhone;

    /**
     * 微信支付部分
     */


    /**
     * 预支付部分
     */
    private String appId;
    private String timeStamp;
    private String nonceStr;
    private String packageValue;
    private String signType;
    private String paySign;

    private WxPayBO wxPayBO;

    public WxCreateOrderVO convertToCreateOrderVO() {
        WxCreateOrderVO vo = new WxCreateOrderVO();
        vo.setAppId(this.getAppId());
        vo.setNonceStr(this.getNonceStr());
        vo.setPackageValue(this.getPackageValue());
        vo.setPaySign(this.getPaySign());
        vo.setSignType(this.getSignType());
        vo.setTimeStamp(this.getTimeStamp());
        return vo;
    }


    /**
     * 转账部分
     */
    private WxTransferBO wxTransferBO;
}
